cargo.git
10 years agoUpdate semver to 0.2.0
Steve Klabnik [Fri, 4 Dec 2015 15:56:34 +0000 (10:56 -0500)]
Update semver to 0.2.0

10 years agoAuto merge of #2134 - alexcrichton:build-script-input, r=brson
bors [Fri, 4 Dec 2015 00:06:21 +0000 (00:06 +0000)]
Auto merge of #2134 - alexcrichton:build-script-input, r=brson

Currently Cargo is quite conservative in how it determines whether a build
script should be run. The heuristic used is "did any file in the project
directory change", but this is almost always guaranteed to be too coarse
grained in situations like:

* If the build script takes a long time to run it's advantageous to run it as
  few times as possible. Being able to inform Cargo about precisely when a build
  script should be run should provide more robust support here.
* Build scripts may not always have all of their dependencies in-tree or in the
  crate root. Sometimes a dependency could be elsewhere in a repository and
  scripts need a method of informing Cargo about this (as currently these
  compiles don't happen then they should).

This commit adds this support in build scripts via a new `rerun-if-changed`
directive which can be printed to standard output (using the standard Cargo
metadata format). The value for this key is a path relative to the crate root,
and Cargo will only look at these paths when determining whether to rerun the
build script. Any other file changes will not trigger the build script to be
rerun.

Currently the printed paths may either be a file or a directory, and a directory
is deeply traversed. The heuristic for trigger a rerun is detecting whether any
input file has been modified since the build script was last run (determined by
looking at the modification time of the output file of the build script). This
current implementation means that if you depend on a directory and then delete a
file within it the build script won't be rerun, but this is already the case and
can perhaps be patched up later.

Future extensions could possibly include the usage of glob patterns in build
script paths like the `include` and `exclude` features of `Cargo.toml`, but
these should be backwards compatible to add in the future.

Closes #1162

10 years agoAuto merge of #2190 - sfackler:wildcard-pushback, r=alexcrichton
bors [Thu, 3 Dec 2015 18:28:24 +0000 (18:28 +0000)]
Auto merge of #2190 - sfackler:wildcard-pushback, r=alexcrichton

We missed a release somewhere, so the warning here won't hit stable
until December 11th.

r? @alexcrichton

10 years agoMove wildcard rejection date back 6 weeks
Steven Fackler [Thu, 3 Dec 2015 01:29:23 +0000 (17:29 -0800)]
Move wildcard rejection date back 6 weeks

We missed a release somewhere, so the warning here won't hit stable
until December 11th.

10 years agoAuto merge of #2186 - alexcrichton:transaction, r=brson
bors [Wed, 2 Dec 2015 00:50:33 +0000 (00:50 +0000)]
Auto merge of #2186 - alexcrichton:transaction, r=brson

Right now a `Bomb` struct is used to attempt to ensure that broken tarballs
don't escape, but this unfortunately doesn't work for when Cargo is terminated
via other means such as ctrl-c or abnormal termination. Instead the tarball is
constructed in a temporary location and then only moved to the final location
once all checks pass.

Closes #2173
cc #2177

10 years agoAuto merge of #2185 - alexcrichton:update, r=alexcrichton
bors [Mon, 30 Nov 2015 23:02:48 +0000 (23:02 +0000)]
Auto merge of #2185 - alexcrichton:update, r=alexcrichton

10 years agoUpdate plugin tests to nightly
Alex Crichton [Mon, 30 Nov 2015 19:21:04 +0000 (11:21 -0800)]
Update plugin tests to nightly

10 years agoAuto merge of #2184 - brandonson:master, r=alexcrichton
bors [Mon, 30 Nov 2015 20:16:08 +0000 (20:16 +0000)]
Auto merge of #2184 - brandonson:master, r=alexcrichton

When the crate to install is unspecified, we should really inform users about
where they can install from (other than crates.io).  This makes the message mention --path
and --git so that people know they exist.

10 years agoPackage/test tarballs in a temporary location
Alex Crichton [Mon, 30 Nov 2015 19:29:15 +0000 (11:29 -0800)]
Package/test tarballs in a temporary location

Right now a `Bomb` struct is used to attempt to ensure that broken tarballs
don't escape, but this unfortunately doesn't work for when Cargo is terminated
via other means such as ctrl-c or abnormal termination. Instead the tarball is
constructed in a temporary location and then only moved to the final location
once all checks pass.

Closes #2173
cc #2177

10 years agoImprove message with unspecified install target.
Brandon Sanderson [Mon, 30 Nov 2015 18:26:47 +0000 (10:26 -0800)]
Improve message with unspecified install target.

When the crate to install is unspecified, we should really inform users about
where they can install from (other than crates.io).  This makes the message mention --path
and --git so that people know they exist.

10 years agoAuto merge of #2176 - gentoo90:bash-comp, r=alexcrichton
bors [Sat, 28 Nov 2015 15:48:22 +0000 (15:48 +0000)]
Auto merge of #2176 - gentoo90:bash-comp, r=alexcrichton

* completion for `install`, `uninstall` and `rustdoc`
* completion for `--color` variants
* some missing options

10 years agoUpdate bash-completion
gentoo90 [Sat, 28 Nov 2015 08:56:06 +0000 (10:56 +0200)]
Update bash-completion

* completion for install, uninstall and rustdoc
* completion for --color variants
* some missing options

10 years agoAuto merge of #2168 - durka:patch-3, r=alexcrichton
bors [Tue, 24 Nov 2015 00:10:33 +0000 (00:10 +0000)]
Auto merge of #2168 - durka:patch-3, r=alexcrichton

In c9f1b9bf1e535a651f624897bd53a3f81af7501f the format of this example was changed from a `[dependencies.awesome]` section to the newly-recommended inline table syntax, but one of the attributes was left out.

I had to use some slightly weird formatting to keep the comment in place, is that OK?

10 years agorestore dependencies.awesome normal table
Alex Burka [Mon, 23 Nov 2015 23:54:49 +0000 (18:54 -0500)]
restore dependencies.awesome normal table

10 years agoinline tables must be on one line, because TOML
Alex Burka [Mon, 23 Nov 2015 21:58:17 +0000 (16:58 -0500)]
inline tables must be on one line, because TOML

10 years agodoc/manifest: fix "default-features" example
Alex Burka [Mon, 23 Nov 2015 20:30:10 +0000 (15:30 -0500)]
doc/manifest: fix "default-features" example

10 years agoAuto merge of #2167 - iirelu:vec-macro-consistency, r=alexcrichton
bors [Mon, 23 Nov 2015 17:22:24 +0000 (17:22 +0000)]
Auto merge of #2167 - iirelu:vec-macro-consistency, r=alexcrichton

~~Because it bugged me~~ It's better to have a single consistent way of using macros, and not mixing `{}` `[]` `()` blocks.

10 years agoMake usage of vec! macro consistent
iirelu [Mon, 23 Nov 2015 16:56:10 +0000 (16:56 +0000)]
Make usage of vec! macro consistent

Previously it was a mix of vec!() and vec![], as both work thanks to the
implementation of macros in Rust (even vec!{} would work), this makes
them all use the generally-accepted vec![] standard, which imitates the
syntax used for slices and is considered to make things clearer.

10 years agoAuto merge of #2166 - alexcrichton:clean-up-update, r=huonw
bors [Mon, 23 Nov 2015 05:31:49 +0000 (05:31 +0000)]
Auto merge of #2166 - alexcrichton:clean-up-update, r=huonw

I've noticed some slightly odd output from `cargo update` in the past and I
believe this cleanup should address what's going on under the hood. There were a
few minor issues with the previous implementation.

* When adding the previous graph to the list of changes, packages with multiple
  versions would override one another instead of all get added to one list.
* The `Ord` implementation for `SourceId` was actually incorrect in that it
  disagreed with the `Eq` implementation. This could end up causing subtle bugs
  here and there. dependening on what operators were used.

This tweak fixes both points and I believe should touch up the odd output I've
been seeing from `cargo update`.

10 years agoClean up the `cargo update` implementation a bit
Alex Crichton [Mon, 23 Nov 2015 05:18:59 +0000 (21:18 -0800)]
Clean up the `cargo update` implementation a bit

I've noticed some slightly odd output from `cargo update` in the past and I
believe this cleanup should address what's going on under the hood. There were a
few minor issues with the previous implementation.

* When adding the previous graph to the list of changes, packages with multiple
  versions would override one another instead of all get added to one list.
* The `Ord` implementation for `SourceId` was actually incorrect in that it
  disagreed with the `Eq` implementation. This could end up causing subtle bugs
  here and there. dependening on what operators were used.

This tweak fixes both points and I believe should touch up the odd output I've
been seeing from `cargo update`.

10 years agoAuto merge of #2160 - alexcrichton:bail-macro, r=huonw
bors [Fri, 20 Nov 2015 22:25:31 +0000 (22:25 +0000)]
Auto merge of #2160 - alexcrichton:bail-macro, r=huonw

This pattern showed up quite a few locations throughout the codebase but it
ended up meaning that there were some massive levels of indentation when you
actually get to the formatting string. This commit adds a new `bail!` macro
which shortens this idiom to help get the indentation under control throughout
the codebase.

10 years agoAdd a macro for `return Err(human(format!(...)))`
Alex Crichton [Fri, 20 Nov 2015 18:46:43 +0000 (10:46 -0800)]
Add a macro for `return Err(human(format!(...)))`

This pattern showed up quite a few locations throughout the codebase but it
ended up meaning that there were some massive levels of indentation when you
actually get to the formatting string. This commit adds a new `bail!` macro
which shortens this idiom to help get the indentation under control throughout
the codebase.

10 years agoAuto merge of #2159 - Manishearth:native-diag, r=alexcrichton
bors [Fri, 20 Nov 2015 18:29:44 +0000 (18:29 +0000)]
Auto merge of #2159 - Manishearth:native-diag, r=alexcrichton

r? @alexcrichton

10 years agoImprove diagnostics for multiple native links for the same package
Manish Goregaokar [Fri, 20 Nov 2015 16:11:05 +0000 (21:41 +0530)]
Improve diagnostics for multiple native links for the same package

10 years agoAuto merge of #2156 - alexcrichton:rebase-2058, r=alexcrichton
bors [Thu, 19 Nov 2015 22:37:17 +0000 (22:37 +0000)]
Auto merge of #2156 - alexcrichton:rebase-2058, r=alexcrichton

Touching up a few last comments before landing

10 years agoTouch up a few last minor comments
Alex Crichton [Thu, 19 Nov 2015 22:36:38 +0000 (14:36 -0800)]
Touch up a few last minor comments

10 years agoMerge branch 'cwd-fixes' of https://github.com/Kimundi/cargo
Alex Crichton [Thu, 19 Nov 2015 22:29:22 +0000 (14:29 -0800)]
Merge branch 'cwd-fixes' of https://github.com/Kimundi/cargo

10 years agoAuto merge of #2154 - alexcrichton:update, r=alexcrichton
bors [Thu, 19 Nov 2015 18:58:52 +0000 (18:58 +0000)]
Auto merge of #2154 - alexcrichton:update, r=alexcrichton

Closes #2152

10 years agoAuto merge of #2153 - carlosgaldino:cg-fix-uninstall, r=alexcrichton
bors [Thu, 19 Nov 2015 18:32:10 +0000 (18:32 +0000)]
Auto merge of #2153 - carlosgaldino:cg-fix-uninstall, r=alexcrichton

With this patch users can type `cargo help uninstall` or `cargo
uninstall -h` and it will display the `USAGE` message as it was supposed to.

Before the patch the command would display an error message about
invalid arguments.

Fixes #2138.

I also updated the man page.

10 years agoUpdate man page.
Carlos Galdino [Thu, 19 Nov 2015 16:49:45 +0000 (14:49 -0200)]
Update man page.

10 years agoFix `cargo-uninstall`.
Carlos Galdino [Thu, 19 Nov 2015 16:47:33 +0000 (14:47 -0200)]
Fix `cargo-uninstall`.

With this patch users can type `cargo help uninstall` or `cargo
uninstall -h` and it will display the `USAGE` message as it was supposed
to.

Before the patch the command would display an error message about
invalid arguments.

Fixes #2138.

10 years agoUpdate dependencies
Alex Crichton [Thu, 19 Nov 2015 17:13:21 +0000 (09:13 -0800)]
Update dependencies

Closes #2152

10 years agoAuto merge of #2151 - IvanUkhov:typography, r=steveklabnik
bors [Wed, 18 Nov 2015 15:56:39 +0000 (15:56 +0000)]
Auto merge of #2151 - IvanUkhov:typography, r=steveklabnik

Hi,

Here are a number of commits making cosmetic adjustments to the documentation. The major change concerns the usage of quotation marks. If needed, some of the commits can be removed, and the rest can be squashed into one. Thanks.

Regards,
Ivan

10 years agoSpell “Cargo” consistently
Ivan Ukhov [Wed, 18 Nov 2015 12:57:41 +0000 (13:57 +0100)]
Spell “Cargo” consistently

10 years agoSpell “GitHub” consistently
Ivan Ukhov [Wed, 18 Nov 2015 12:48:15 +0000 (13:48 +0100)]
Spell “GitHub” consistently

10 years agoFix a typo
Ivan Ukhov [Wed, 18 Nov 2015 12:39:45 +0000 (13:39 +0100)]
Fix a typo

10 years agoUse “etc.” consistently
Ivan Ukhov [Wed, 18 Nov 2015 12:38:19 +0000 (13:38 +0100)]
Use “etc.” consistently

10 years agoUse proper quotation marks
Ivan Ukhov [Wed, 18 Nov 2015 12:19:13 +0000 (13:19 +0100)]
Use proper quotation marks

10 years agoAuto merge of #2131 - alexcrichton:cargo-clean, r=brson
bors [Sun, 15 Nov 2015 21:02:59 +0000 (21:02 +0000)]
Auto merge of #2131 - alexcrichton:cargo-clean, r=brson

* Clean out both host/target platforms if any are available.
* Clean out build script output.
* Add a --release flag to also be able to clean out release folder
* Be sure to clean out benchmarks, tests, etc.
* Cleaning out registry packages no longer panics

Closes #2121

10 years agoFix a number of bugs with cargo clean
Alex Crichton [Tue, 10 Nov 2015 17:41:06 +0000 (09:41 -0800)]
Fix a number of bugs with cargo clean

* Clean out both host/target platforms if any are available.
* Clean out build script output.
* Add a --release flag to also be able to clean out release folder
* Be sure to clean out benchmarks, tests, etc.
* Cleaning out registry packages no longer panics

Closes #2121

10 years agoAuto merge of #2136 - gkoz:empty_fingerprint, r=alexcrichton
bors [Thu, 12 Nov 2015 00:12:01 +0000 (00:12 +0000)]
Auto merge of #2136 - gkoz:empty_fingerprint, r=alexcrichton

None

10 years agoFix #1504. Don't blow up on empty fingerprint files
Gleb Kozyrev [Wed, 11 Nov 2015 23:56:21 +0000 (01:56 +0200)]
Fix #1504. Don't blow up on empty fingerprint files

10 years agoAllow build scripts to specify dependencies
Alex Crichton [Wed, 11 Nov 2015 00:39:15 +0000 (16:39 -0800)]
Allow build scripts to specify dependencies

Currently Cargo is quite conservative in how it determines whether a build
script should be run. The heuristic used is "did any file in the project
directory change", but this is almost always guaranteed to be too coarse
grained in situations like:

* If the build script takes a long time to run it's advantageous to run it as
  few times as possible. Being able to inform Cargo about precisely when a build
  script should be run should provide more robust support here.
* Build scripts may not always have all of their dependencies in-tree or in the
  crate root. Sometimes a dependency could be elsewhere in a repository and
  scripts need a method of informing Cargo about this (as currently these
  compiles don't happen then they should).

This commit adds this support in build scripts via a new `rerun-if-changed`
directive which can be printed to standard output (using the standard Cargo
metadata format). The value for this key is a path relative to the crate root,
and Cargo will only look at these paths when determining whether to rerun the
build script. Any other file changes will not trigger the build script to be
rerun.

Future extensions could possibly include the usage of glob patterns in build
script paths like the `include` and `exclude` features of `Cargo.toml`, but
these should be backwards compatible to add in the future.

Closes #1162

10 years agoAuto merge of #2135 - alexcrichton:bundle-crate-in-registry, r=huonw
bors [Wed, 11 Nov 2015 02:25:31 +0000 (02:25 +0000)]
Auto merge of #2135 - alexcrichton:bundle-crate-in-registry, r=huonw

Even if multiple ones are included, don't recurse!

Closes #2132

10 years agoOnly read one package from registry tarballs
Alex Crichton [Wed, 11 Nov 2015 02:17:23 +0000 (18:17 -0800)]
Only read one package from registry tarballs

Even if multiple ones are included, don't recurse!

Closes #2132

10 years agoRefactor testing the registry
Alex Crichton [Wed, 11 Nov 2015 02:08:06 +0000 (18:08 -0800)]
Refactor testing the registry

Use a builder to publish packages instead of a one-off function with many
variants, should provide a much finer grained level of configurability for
future test cases against the registry.

10 years agoAuto merge of #2128 - k0pernicus:patch-1, r=alexcrichton
bors [Tue, 10 Nov 2015 21:20:13 +0000 (21:20 +0000)]
Auto merge of #2128 - k0pernicus:patch-1, r=alexcrichton

Add a comment to know how to pass arguments via Cargo

10 years agoUpdate guide.md
WebTogz [Tue, 10 Nov 2015 18:28:47 +0000 (19:28 +0100)]
Update guide.md

Modification of the second sentence, to explain how to pass flags with Cargo

10 years agoAuto merge of #2126 - johshoff:default_dependency_header, r=alexcrichton
bors [Tue, 10 Nov 2015 07:16:25 +0000 (07:16 +0000)]
Auto merge of #2126 - johshoff:default_dependency_header, r=alexcrichton

Almost any project beyond "hello world" will have some dependencies.
Including the `[dependencies]` header by default makes this slightly
simpler.

For new users of the language, this can potentially save some
frustration since crates.io currently does not mention the header, just
the line that goes beneath it.

For all users, this makes adding the first dependency to a project less
of a special case than to subsequent dependencies.

10 years agoUpdate guide.md
WebTogz [Tue, 10 Nov 2015 07:10:06 +0000 (08:10 +0100)]
Update guide.md

Correctness of the previous modification, regarding how to pass arguments via Cargo

10 years agoAuto merge of #2129 - alexcrichton:cargo-rustdoc, r=brson
bors [Mon, 9 Nov 2015 23:12:46 +0000 (23:12 +0000)]
Auto merge of #2129 - alexcrichton:cargo-rustdoc, r=brson

Along the same lines as `cargo rustc` basically

10 years agoUpdate guide.md
WebTogz [Mon, 9 Nov 2015 19:39:44 +0000 (20:39 +0100)]
Update guide.md

Add a comment to know how to pass arguments via Cargo

10 years agoRebase `cargo rustdoc` and tweak behavior
Alex Crichton [Mon, 9 Nov 2015 16:36:52 +0000 (08:36 -0800)]
Rebase `cargo rustdoc` and tweak behavior

This rebases #1977 onto master and also tweaks the behavior to match `cargo
rustc` when there are multiple targets in play.

10 years agoAdd `cargo rustdoc` for passing arbitrary flags to rustdoc
Manish Goregaokar [Wed, 9 Sep 2015 08:46:43 +0000 (14:16 +0530)]
Add `cargo rustdoc` for passing arbitrary flags to rustdoc

10 years agoAdd dependency header in default Cargo.toml
Johannes Hoff [Sun, 8 Nov 2015 03:36:06 +0000 (19:36 -0800)]
Add dependency header in default Cargo.toml

Almost any project beyond "hello world" will have some dependencies.
Including the `[dependencies]` header by default makes this slightly
simpler.

For new users of the language, this can potentially save some
frustration since crates.io currently does not mention the header, just
the line that goes beneath it.

For all users, this makes adding the first dependency to a project less
of a special case than to subsequent dependencies.

10 years agoAuto merge of #2118 - alexcrichton:update-curl, r=alexcrichton
bors [Thu, 5 Nov 2015 23:43:33 +0000 (23:43 +0000)]
Auto merge of #2118 - alexcrichton:update-curl, r=alexcrichton

This should help continue to mitigate #1420 further

10 years agoUpdate to a curl-rust that doesn't use OpenSSL on OSX
Alex Crichton [Thu, 5 Nov 2015 23:42:22 +0000 (15:42 -0800)]
Update to a curl-rust that doesn't use OpenSSL on OSX

This should help continue to mitigate #1420 further

10 years agoAuto merge of #2115 - alexcrichton:nondeterminism, r=brson
bors [Thu, 5 Nov 2015 17:09:37 +0000 (17:09 +0000)]
Auto merge of #2115 - alexcrichton:nondeterminism, r=brson

These were all exhibiting some nondeterminism which meant that they were failing
tests on CI.

10 years agoRelax some output assertions in tests
Alex Crichton [Thu, 5 Nov 2015 01:09:45 +0000 (17:09 -0800)]
Relax some output assertions in tests

These were all exhibiting some nondeterminism which meant that they were failing
tests on CI.

10 years agoAuto merge of #2114 - alexcrichton:install-relative-path, r=brson
bors [Wed, 4 Nov 2015 22:19:03 +0000 (22:19 +0000)]
Auto merge of #2114 - alexcrichton:install-relative-path, r=brson

Closes #2106

10 years agoFix install `--path` with a relative path
Alex Crichton [Wed, 4 Nov 2015 21:20:53 +0000 (13:20 -0800)]
Fix install `--path` with a relative path

Closes #2106

10 years agoAuto merge of #2113 - alexcrichton:weird-filenames, r=brson
bors [Wed, 4 Nov 2015 21:48:15 +0000 (21:48 +0000)]
Auto merge of #2113 - alexcrichton:weird-filenames, r=brson

This commit is targeted at fixing #2102 via two routes:

1. The dependency on `tar` was upgraded to include more contextual information
   in error messages about why the unpack failed. This should help diagnose
   these sorts of issues that happen in the first place.
2. Packaging crates that have files with odd filenames is no longer allowed.
   An error is returned indicating that the files cannot be packaged as they're
   not cross platform. The currently rejected set of files are non-utf8
   filenames (already present) and those containing characters special on
   Windows.

Closes #2102

10 years agoAdd more safeguards around odd filenames
Alex Crichton [Wed, 4 Nov 2015 21:11:19 +0000 (13:11 -0800)]
Add more safeguards around odd filenames

This commit is targeted at fixing #2102 via two routes:

1. The dependency on `tar` was upgraded to include more contextual information
   in error messages about why the unpack failed. This should help diagnose
   these sorts of issues that happen in the first place.
2. Packaging crates that have files with odd filenames is no longer allowed.
   An error is returned indicating that the files cannot be packaged as they're
   not cross platform. The currently rejected set of files are non-utf8
   filenames (already present) and those containing characters special on
   Windows.

Closes #2102

10 years agoAuto merge of #2091 - winger:master, r=alexcrichton
bors [Tue, 3 Nov 2015 06:54:22 +0000 (06:54 +0000)]
Auto merge of #2091 - winger:master, r=alexcrichton

API changes needed for https://github.com/winger/cargo-metadata external command.
See https://github.com/rust-lang/cargo/pull/1434 for previous discussion.

10 years agoChanges required for cargo-metadata
winger [Thu, 29 Oct 2015 20:05:42 +0000 (13:05 -0700)]
Changes required for cargo-metadata

10 years agoAuto merge of #2103 - takkanm:add_install_help, r=alexcrichton
bors [Tue, 3 Nov 2015 04:01:33 +0000 (04:01 +0000)]
Auto merge of #2103 - takkanm:add_install_help, r=alexcrichton

There was no "install" to help message.

10 years agoadd install help
Mitsutaka Mimura [Mon, 2 Nov 2015 06:58:37 +0000 (15:58 +0900)]
add install help

10 years agoAuto merge of #2104 - mbrubeck:test-doc, r=alexcrichton
bors [Mon, 2 Nov 2015 21:01:58 +0000 (21:01 +0000)]
Auto merge of #2104 - mbrubeck:test-doc, r=alexcrichton

None

10 years agoDocs: Mention the [[example]] section
Matt Brubeck [Mon, 2 Nov 2015 19:33:34 +0000 (11:33 -0800)]
Docs: Mention the [[example]] section

10 years agoExpand documentation on integration tests
Matt Brubeck [Mon, 2 Nov 2015 19:32:26 +0000 (11:32 -0800)]
Expand documentation on integration tests

10 years agoDocs: Clarify what `cargo test` compiles vs. runs
Matt Brubeck [Mon, 2 Nov 2015 19:21:30 +0000 (11:21 -0800)]
Docs: Clarify what `cargo test` compiles vs. runs

10 years agoAuto merge of #2097 - alexcrichton:dont-panic-when-slicing, r=huonw
bors [Sat, 31 Oct 2015 23:56:24 +0000 (23:56 +0000)]
Auto merge of #2097 - alexcrichton:dont-panic-when-slicing, r=huonw

Closes #2094

10 years agoDon't panic when printing the precise source id
Alex Crichton [Sat, 31 Oct 2015 17:03:18 +0000 (10:03 -0700)]
Don't panic when printing the precise source id

Closes #2094

10 years agoAuto merge of #2092 - gkoz:lock_line_endings, r=alexcrichton
bors [Fri, 30 Oct 2015 19:39:46 +0000 (19:39 +0000)]
Auto merge of #2092 - gkoz:lock_line_endings, r=alexcrichton

Before writing the lockfile read the existing one and

 * detect the line endings style, fixes #2076, #1722;
 * compare the contents to avoid redundant overwriting.

10 years agoDetect the line endings convention of Cargo.lock (CRLF or LF) and preserve it
Gleb Kozyrev [Fri, 30 Oct 2015 11:31:14 +0000 (13:31 +0200)]
Detect the line endings convention of Cargo.lock (CRLF or LF) and preserve it

Fixes #2076

10 years agoAvoid overwriting the lockfile if there are no changes
Gleb Kozyrev [Fri, 30 Oct 2015 11:18:19 +0000 (13:18 +0200)]
Avoid overwriting the lockfile if there are no changes

10 years agoAuto merge of #2093 - alexcrichton:bump, r=alexcrichton
bors [Fri, 30 Oct 2015 18:26:01 +0000 (18:26 +0000)]
Auto merge of #2093 - alexcrichton:bump, r=alexcrichton

10 years agoBump to 0.7.0
Alex Crichton [Fri, 30 Oct 2015 18:25:30 +0000 (11:25 -0700)]
Bump to 0.7.0

10 years agoAdd a test for #2076, preservation of line endings style
Gleb Kozyrev [Fri, 30 Oct 2015 10:39:35 +0000 (12:39 +0200)]
Add a test for #2076, preservation of line endings style

10 years agoAuto merge of #2070 - alexcrichton:test-optional, r=brson
bors [Fri, 30 Oct 2015 00:54:15 +0000 (00:54 +0000)]
Auto merge of #2070 - alexcrichton:test-optional, r=brson

Previously a warning was issued if both -p and --features were passed as flags,
and the rationale for this was that if --features modified the activated set of
features in the package selected by -p it would alter Cargo.lock, which is
undesirable as Cargo.lock should be stable.

This commit, however, interprets --features as changing the resolved graph of
the top-level package, and then -p is a query on that resolved graph. This way
the Cargo.lock file never changes and you're allowed to test optional
dependencies.

Closes #2083

10 years agoFixed testsuite
Marvin Löbel [Wed, 28 Oct 2015 09:20:00 +0000 (10:20 +0100)]
Fixed testsuite

10 years agoMade cwd setting in process builder optional
Marvin Löbel [Wed, 28 Oct 2015 09:17:32 +0000 (10:17 +0100)]
Made cwd setting in process builder optional

10 years agoMade cargo derive more working directory locations from its Config
Marvin Löbel [Fri, 16 Oct 2015 12:54:40 +0000 (14:54 +0200)]
Made cargo derive more working directory locations from its Config

10 years agoAuto merge of #2077 - Lechindianer:master, r=alexcrichton
bors [Thu, 22 Oct 2015 21:59:36 +0000 (21:59 +0000)]
Auto merge of #2077 - Lechindianer:master, r=alexcrichton

Just a simple fix

10 years agoFixed typo
Pascal Schmid [Thu, 22 Oct 2015 22:01:31 +0000 (00:01 +0200)]
Fixed typo

10 years agoAuto merge of #2061 - alexcrichton:update, r=alexcrichton
bors [Wed, 21 Oct 2015 20:59:56 +0000 (20:59 +0000)]
Auto merge of #2061 - alexcrichton:update, r=alexcrichton

* Move along the same rails for all dependencies, picking up various small perf,
  build, and portability improvements.
* Update pinned rustc to pick up perf improvements and such
* Tweak expected error message from tests to continue to work

10 years agoUpdate dependencies
Alex Crichton [Mon, 19 Oct 2015 05:20:20 +0000 (22:20 -0700)]
Update dependencies

* Move along the same rails for all dependencies, picking up various small perf,
  build, and portability improvements.
* Update pinned rustc to pick up perf improvements and such
* Tweak expected error message from tests to continue to work

10 years agoAuto merge of #2071 - aarzee:master, r=alexcrichton
bors [Wed, 21 Oct 2015 17:40:44 +0000 (17:40 +0000)]
Auto merge of #2071 - aarzee:master, r=alexcrichton

Whitespace: remove leading newlines; replace lines containing only whitespace with empty lines; replace multiple trailing newlines with a single newline; remove trailing whitespace in lines.

Images: Compress PNG files with zopflipng, JPG files with mozjpeg jpegtran, and GIF files with gifsicle.

This PR was created semiautomatically.

10 years agoAuto merge of #2072 - durka:patch-2, r=alexcrichton
bors [Wed, 21 Oct 2015 17:13:33 +0000 (17:13 +0000)]
Auto merge of #2072 - durka:patch-2, r=alexcrichton

10 years agofix copy/paste error in doc
Alex Burka [Wed, 21 Oct 2015 17:10:31 +0000 (13:10 -0400)]
fix copy/paste error in doc

10 years agoCleanup
Carlos Liam [Wed, 21 Oct 2015 16:57:20 +0000 (12:57 -0400)]
Cleanup

Whitespace: remove leading newlines; replace lines containing only whitespace with empty lines; replace multiple trailing newlines with a single newline; remove trailing whitespace in lines. Images: Compress PNG files with zopflipng, JPG files with mozjpeg jpegtran, and GIF files with gifsicle.

10 years agoAllow testing optional dependencies
Alex Crichton [Wed, 21 Oct 2015 00:19:56 +0000 (17:19 -0700)]
Allow testing optional dependencies

Previously a warning was issued if both -p and --features were passed as flags,
and the rationale for this was that if --features modified the activated set of
features in the package selected by -p it would alter Cargo.lock, which is
undesirable as Cargo.lock should be stable.

This commit, however, interprets --features as changing the resolved graph of
the top-level package, and then -p is a query on that resolved graph. This way
the Cargo.lock file never changes and you're allowed to test optional
dependencies.

10 years agoAuto merge of #2068 - alexcrichton:root-profiles, r=brson
bors [Tue, 20 Oct 2015 22:58:31 +0000 (22:58 +0000)]
Auto merge of #2068 - alexcrichton:root-profiles, r=brson

When testing or building multiple packages via the `-p` argument the root
package's profiles should always be used instead of the sub-package's set of
profiles.

10 years agoAlways use the root package's set of profiles
Alex Crichton [Tue, 20 Oct 2015 22:50:58 +0000 (15:50 -0700)]
Always use the root package's set of profiles

When testing or building multiple packages via the `-p` argument the root
package's profiles should always be used instead of the sub-package's set of
profiles.

10 years agoAuto merge of #2067 - apasel422:spell, r=alexcrichton
bors [Tue, 20 Oct 2015 17:45:22 +0000 (17:45 +0000)]
Auto merge of #2067 - apasel422:spell, r=alexcrichton

10 years agoCorrect spelling in docs
Andrew Paseltiner [Tue, 20 Oct 2015 17:26:16 +0000 (13:26 -0400)]
Correct spelling in docs

10 years agoAuto merge of #2062 - aarzee:master, r=steveklabnik
bors [Mon, 19 Oct 2015 15:21:07 +0000 (15:21 +0000)]
Auto merge of #2062 - aarzee:master, r=steveklabnik

Remove leading newlines; replace lines containing only whitespace with empty lines; replace multiple trailing newlines with a single newline; remove trailing whitespace in lines.

This PR was created semiautomatically.

10 years agoClean whitespace
Carlos Liam [Mon, 19 Oct 2015 15:17:53 +0000 (11:17 -0400)]
Clean whitespace

Remove leading newlines; replace lines containing only whitespace with empty lines; replace multiple trailing newlines with a single newline; remove trailing whitespace in lines

10 years agoAuto merge of #2026 - alexcrichton:cargo-install, r=brson
bors [Mon, 19 Oct 2015 04:44:21 +0000 (04:44 +0000)]
Auto merge of #2026 - alexcrichton:cargo-install, r=brson

This commit is an implementation of [RFC 1200][rfc] which brings two new
subcommands: `cargo install` and `cargo uninstall`. Most of this is a straight
implementation of the RFC, but a few tweaks were made:

* The `-p` or `--package` arguments are no longer needed as you just pass
  `crate` as a bare argument to the command, this means `cargo install foo`
  works and downloads from crates.io by default.
* Some logic around selecting which crate in a multi-crate repo is installed has
  been tweaked slightly, but mostly in the realm of "let's do the thing that
  makes sense" rather than the literal "let's do what's in the RFC".
  Specifically, we don't pick a crate with examples if there are multiple crates
  with binaries (instead an error is generated saying there are multiple binary
  crates).

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1200-cargo-install.md

10 years agoFinish implementing `cargo install`
Alex Crichton [Mon, 5 Oct 2015 22:29:15 +0000 (15:29 -0700)]
Finish implementing `cargo install`

This commit is an implementation of [RFC 1200][rfc] which brings two new
subcommands: `cargo install` and `cargo uninstall`. Most of this is a straight
implementation of the RFC, but a few tweaks were made:

* The `-p` or `--package` arguments are no longer needed as you just pass
  `crate` as a bare argument to the command, this means `cargo install foo`
  works and downloads from crates.io by default.
* Some logic around selecting which crate in a multi-crate repo is installed has
  been tweaked slightly, but mostly in the realm of "let's do the thing that
  makes sense" rather than the literal "let's do what's in the RFC".
  Specifically, we don't pick a crate with examples if there are multiple crates
  with binaries (instead an error is generated saying there are multiple binary
  crates).

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1200-cargo-install.md